<?php

namespace app\apisell\controller\admin;

use app\apisell\service\ExaminePopu\ExaminePopuService;
use app\apisell\service\popuUser\PopuUserService;
use app\common\controller\BaseController;
use app\common\utils\Res;

class PopuUser extends BaseController
{
    //推广员列表
    public function getList()
    {
        $param = $this->request->param();
        $result = PopuUserService::getList($param);
        return Res::ok($result);
    }

    //操作-离职
    public function quit()
    {
        $param = $this->request->param();
        $result = PopuUserService::quit($param);
        return Res::ok($result);
    }

    //获取可以继承的员工列表
    public function getCanInheritStaffList()
    {
        $param = $this->request->param();
        $result = PopuUserService::getCanInheritStaffList($param);
        return Res::ok($result);
    }
    
    //操作-继承
    public function inherit()
    {
        $param = $this->request->param();
        $operate_id = $this->request->popuId;
        $result = PopuUserService::inherit($param,$operate_id);
        return Res::ok($result);
    }
    
    //获取离职人员列表
    public function getResignList()
    {
        $param = $this->request->param();
        $result = PopuUserService::getResignList($param);
        return Res::ok($result);
    }

    //获取继承人员列表
    public function getInheritList()
    {
        $param = $this->request->param();
        $result = PopuUserService::getInheritList($param);
        return Res::ok($result);
    }
}